package vote.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import vote.domain.RequestUser;

import java.time.LocalDateTime;

/**
 * Description:用户信息
 * Author:han
 * Date: 2024-05-21
 */
@Data
@TableName("user_info")
public class User implements RequestUser {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String openId;//用户唯一标识
    private String name;
    private String avatar;
    private String phone;
    private String sex;
    private String ip;
    private LocalDateTime createAt;

    @Override
    public Long getUserId() {
        return id;
    }

    @Override
    public String getUserName() {
        return name;
    }

}
